home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / db / esm-3.1 / esm-3 / usr / local / sm / doc / using3.0.me < prev    next >
Encoding:
Text File  |  1996-05-05  |  4.2 KB  |  149 lines

  1. .fi
  2. .sp 3
  3. .ce 1
  4. Converting Exodus Storage Manger Applications from V2 to V3.0 
  5. .ul
  6. .sp
  7. .lp
  8. This note explains how to get your E and SM programs running quickly
  9. with SM 3.0.  
  10. It does not explain all the new features.  
  11. SM 3.0 is very similar to SM 2.2 except in the area of
  12. configuration files and how volumes are accessed.
  13. .lp
  14. For each volume that an application uses, 
  15. the SM client library must know its volume ID and the 
  16. address of the server that manages it.  
  17. This information is specified using the "mount" option.  
  18. The mount option is different from others in that is 
  19. can have multiple values.  
  20. The example configuration file below explains how to use it.
  21. .lp
  22. Volume location and format information is now specified by options for
  23. the server and the formatvol program.  
  24. The example configuration file explains how to use these options.
  25. .(b
  26. \fC
  27. # ---- EXAMPLE .sm_config FILE ----
  28. # This is an example configuration file for SM 3.0
  29. # The client has a 400 page buffer pool.
  30. client*bufpages:      400
  31. #
  32. # The client library finds out what volumes it can mount from the mount
  33. # option.  The first number in the option value is the volume ID.  The
  34. # second number is a port number for the server managing the volume.
  35. # The address after "@" is the machine on which the server is running.
  36. #
  37. client*mount:          3001 9000@caseus.cs.wisc.edu
  38. client*mount:          3002 9000@caseus.cs.wisc.edu
  39. \fR
  40. .)b
  41. .(b
  42. \fC
  43. #
  44. # Common server options
  45. server*bufpages:    600
  46. server*verbose:     yes
  47. #
  48. # The server "sm_server" will run on this port.  Notice that 9000
  49. # matches the information in the client's mount option above.
  50. #
  51. server.sm_server.portname:  9000
  52. \fR
  53. .)b
  54. .(b
  55. \fC
  56. #
  57. # Here we tell the server and formatvol about the log and data
  58. # volumes.
  59. # The "[sf]*" prefix to the options makes them visible to
  60. # servers and formatvol.
  61. #
  62. # The logformat option describes the log volume.
  63. # The first part of the option is the name of the file containing
  64. # the volume.  Next is the volume ID, the number of cylinders
  65. # in the volume, the number of tracks/per cylinder, the number
  66. # of pages/track, and finally the size (in K) of log pages. 
  67. #
  68. [sf]*logformat: /var/home/zwilling/volume/log.4d 3000: 1: 1: 1000: 4
  69.  
  70. #
  71. # The dataformat option describes the data volumes.
  72. # It is identical to logformat except there is no log page size
  73. # parameter.  Note that colons or white space can be used to
  74. # delimit the parts of the option value.
  75. #
  76. [sf]*.dataformat:   /var/home/zwilling/volume/vol3001 3001 1 1 1000
  77. [sf]*.dataformat:   /var/home/zwilling/volume/vol3002 3002 1 1 1000
  78.  
  79. #
  80. # This specifies that the server, "sm_server", uses volume 3000 for a
  81. # log.
  82. #
  83. server.sm_server.logvolume: 3000
  84. \fR
  85. .)b
  86. .lp
  87. Below are steps to follow to convert to SM 3.0:
  88. .uh "FOR ALL USERS"
  89. .lp
  90. .np
  91. Use the example configuration file below to 
  92. update your current configuration file(s).
  93. .np
  94. Run the 3.0 formatvol to reformat your log and data volumes.  
  95. Here is an example for the volumes in the configuration file
  96. below:
  97. .(b
  98. \fCformatvol -vol 3000
  99. formatvol -vol 3001 \fR
  100. .)b
  101. You can get info on the volumes using:
  102. .(b
  103. \fCformatvol -dis 3000
  104. formatvol -dis 3001\fR
  105. .)b
  106. .np
  107. Start \fCsm_server\fR.
  108. .nr Z \n($p
  109. .uh "FOR E USERS"
  110. .nr $p \nZ
  111. .np
  112. Relink your E programs (with the new E library and the new SM client library).
  113. .np
  114. To specify the volume for data, 
  115. use the EVOLID environment variable instead of EVOLUME.  
  116. For example:
  117. .(b
  118. \fCsetenv EVOLID 3001\fR
  119. .)b
  120. .np
  121. Run your program.
  122. .uh "FOR DIRECT SM USERS"
  123. .nr $p \nZ
  124. .np
  125. Update your programs. 
  126. Sm_Initialize() no longer takes any parameters.
  127. You no longer should call sm_MountVolume() or sm_DismountVolume()
  128. Your programs still probably have some "volid" variable to
  129. initialize.  A common way to do this is to use the value
  130. of the EVOLID environment variable.  If your code previously
  131. did something like:
  132. .(b
  133. \fCsm_MountVolume(getenv(EVOLUME), &volid);\fR
  134. .)b
  135. now just use:
  136. .(b
  137. \fCvolid = atoi(getenv(EVOLID));\fR
  138. .)b
  139. then "setenv EVOLID" to a volume given with the mount option
  140. in a .sm_config file
  141. .np
  142. Recompile your programs and link with the new client
  143. library (\fClibsm_client.a\fR).
  144. You must use g++ to compile your programs or else
  145. link in the gnu library (at UW this is in 
  146. \fC/usr/gnu/lib/gcc-lib/decstation/2.3.3/libgcc.a\fR).
  147. .np
  148. Run your program.
  149.